package com.example.conf.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 商城团购活动
 * </p>
 *
 * @author wpdcn
 * @since 2020-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("shop_group_buy_campaign")
@ApiModel(value="ShopGroupBuyCampaignEntity对象", description="商城团购活动")
public class ShopGroupBuyCampaignEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column(comment = "主键id")
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Column(comment = "账户id")
    @ApiModelProperty(value = "账户id")
    private Long accountId;

    @Column(comment = "团购类型：1-物业团；0-非物业团")
    @ApiModelProperty("团购类型：1-物业团；0-非物业团")
    private String type;

    @Column(comment = "所属小区id")
    @ApiModelProperty("所属小区id")
    private Long communityId;

    @Column(comment = "小区名称")
    @ApiModelProperty("小区名称")
    @TableField(exist = false)
    private String communityName;

    @Column(comment = "活动名称")
    @ApiModelProperty(value = "活动名称")
    private String name;

    @Column(comment = "活动开始时间")
    @ApiModelProperty(value = "活动开始时间")
    private LocalDateTime startTime;

    @Column(comment = "活动结束时间")
    @ApiModelProperty(value = "活动结束时间")
    private LocalDateTime endTime;

    @Column(comment = "成团人数")
    @ApiModelProperty(value = "成团人数")
    private Integer successPeople;

    @Column(comment = "成团时间(分钟)")
    @ApiModelProperty(value = "成团时间(分钟)")
    private Integer successTime;

    @Column(comment = "团购价格(元)")
    @ApiModelProperty(value = "团购价格(元)")
    private Double groupPrice;

    @Column(comment = "状态：1未开始；2进行中；5人数已满；3已失效；4已结束；")
    @ApiModelProperty(value = "状态：1未开始；2进行中；5人数已满；3已失效；4已结束；")
    private String status;

    @Column(comment = "团购轮次")
    @ApiModelProperty("团购轮次")
    private Integer turn;

    @Column(comment = "参团商品id")
    @ApiModelProperty(value = "参团商品id")
    private Long goodId;

    @Column(comment = "参团商品名称")
    @ApiModelProperty("参团商品名称")
    @TableField(exist = false)
    private String goodName;

    @Column(comment = "参团商品主图")
    @ApiModelProperty("参团商品主图")
    @TableField(exist = false)
    private String masterImgUrl;

    @Column(comment = "商品购买数量")
    @ApiModelProperty("商品购买数量")
    @TableField(exist = false)
    private Integer number;

    @Column(comment = "收货信息id")
    @ApiModelProperty("收货信息id")
    @TableField(exist = false)
    private Long deliveryId;

    @Column(comment = "参团状态：1-参团；0-未参团")
    @ApiModelProperty("参团状态：1-参团；0-未参团")
    @TableField(exist = false)
    private String inGroupStatus;

    @Column(comment = "成团结果：0-未团拼成功；1-已团拼成功")
    @ApiModelProperty("成团结果：0-未团拼成功；1-已团拼成功")
    @TableField(exist = false)
    private String groupResult;

    @Column(comment = "团内人数")
    @ApiModelProperty("团内人数")
    @TableField(exist = false)
    private Integer groupMemberNum;

    @Column(comment = "自提地点")
    @ApiModelProperty(value = "自提地点")
    private String selfDeliveryAddress;

    @Column(comment = "配送方式：1-自提；2-邮寄；3-自提+邮寄")
    @ApiModelProperty("配送方式：1-自提；2-邮寄；3-自提+邮寄")
    private String deliveryMethod;


    @Column(comment = "参与团购的sku价格")
    @ApiModelProperty("参与团购的sku价格")
    @TableField(exist = false)
    private Double skuPrice;

    @Column(comment = "skuId")
    @ApiModelProperty("skuId")
    @TableField(exist = false)
    private Long skuId;

}
